home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 27 / Mac Magazin and MacEasy Magazine CD - Issue 27.iso / Grafik & Text / sulu_v1 / Samples / PCCTS Digest - 20⁄01⁄95 < prev    next >
Internet Message Format  |  1995-01-20  |  6KB

  1. From: parrt@garage.ecn.purdue.edu (Terence J Parr)
  2. Subject: Re: Token label bug when using LL(2) lookahead
  3. Date: 13 Jan 1995 21:36:27 GMT
  4.  
  5.  
  6. Kari,
  7.  
  8. Actually, I think that your trouble likes with -gk option which I
  9. just "fixed" for 1.31.  I'm looking into it now.  Try w/o it as a
  10. quick fix.
  11.  
  12. Terence
  13.  
  14. WAIT!  Just found the problem!  Argh.  Unfortunately, I have no
  15. easy solution.  Essentially the internal LA() function (lookahead token
  16. type) is cool, but the LT() (lookahead token ptr) function is screwed
  17. up for -gk option.  Argh.  I'll look more deeply later.  I think
  18. I know how to fix it.
  19.  
  20.  
  21.  
  22. From: grano@cc.Helsinki.FI (Kari Grano)
  23. Subject: Re: Token label bug when using LL(2) lookahead
  24. Date: 16 Jan 1995 11:28:40 +0200
  25. Mime-Version: 1.0
  26. Content-Type: text/plain; charset=ISO-8859-1
  27. Content-Transfer-Encoding: 8bit
  28.  
  29. In article <3f6ror$i9u@mozo.cc.purdue.edu>,
  30. Terence J Parr <parrt@garage.ecn.purdue.edu> wrote:
  31. >>
  32. >>Kari,
  33. >>
  34. >>Actually, I think that your trouble likes with -gk option which I
  35. >>just "fixed" for 1.31.  I'm looking into it now.  Try w/o it as a
  36. >>quick fix.
  37.  
  38.     Wow, that seems to fix it. Thanks!
  39.  
  40. >>WAIT!  Just found the problem!  Argh.  Unfortunately, I have no
  41. >>easy solution.  Essentially the internal LA() function (lookahead token
  42.  
  43.     Ok, I can live without interactivity for a while :-)
  44.     Thank you for the quick answer. Keep up the great work!
  45.     
  46.     Regards,
  47.     Kari.
  48. -- 
  49. Kari Grano    grano@cs.helsinki.fi    Hey, my opinions are just mine..
  50.     "I've got a thousand telephones that don't ring" - R.Z.
  51.  
  52. From: tory@cs.montana.edu (Tory Eneboe)
  53. Subject: column problems with C++ version of PCCTS
  54. Date: 13 Jan 1995 21:19:28 GMT
  55.  
  56. I am having problems retreiving the token column information when using the
  57. C++ version of PCCTS.  For example, how would I retrieve the end column
  58. position of the token ID in the example below.  I know I should use the
  59. function endcol() (a method in the class DLGLexerBase), but I can't seem to
  60. get it to work.  Please help!!!
  61.  
  62. ________________________________________________________________________________
  63.  
  64. #include <stream.h>
  65. #include "tokens.h"
  66. #include "CParser.h"
  67. #include "DLGLexer.h"
  68. typedef ANTLRCommonToken ANTLRToken;
  69.  
  70. main(int argc, char *argv[])
  71. {
  72.    DLGFileInput in(stdin);
  73.    DLGLexer scan(&in, 2000);
  74.    ANTLRTokenBuffer pipe(&scan, 2);
  75.    ANTLRToken aToken;
  76.    scan.setToken(&aToken);
  77.    scan.trackColumns();  //  Keep track of the token column information. 
  78.    CParser parser(&pipe);
  79.    parser.init();
  80.    parser.start();
  81. }
  82.  
  83. #token ID "[a-z]"
  84.  
  85. class CParser
  86. {
  87.    start :  "\(", ID "\)"  // How do I get the end column position for ID???
  88.    ;
  89. }
  90. -- 
  91. --------------------------------------------------------------------------------
  92.                                   Tory Eneboe
  93.                           "tory@fubar.cs.montana.edu"
  94. --------------------------------------------------------------------------------
  95.  
  96. From: pollart@univ-lille1.fr (Michel Pollart)
  97. Subject: looking for Install Pccts Dos version
  98. Date: Mon, 16 Jan 1995 18:52:45
  99. X-Newsreader: Trumpet for Windows [Version 1.0 Rev A]
  100.  
  101. Is some one can give me a Host adresse where I can find
  102. a Pccts version for dos 
  103. Thanks !
  104.  
  105.  
  106. ornato@onera.fr said:
  107.  
  108. >    I'm writting to the mailing-list because my
  109. > news-server is down, please forgive me.
  110.  
  111. >    I've got a grammar file that is becoming rather large, with
  112. > a lot of "C" actions. As a result, it takes a lot of time to
  113. > compile the antlr-generated "C" file (I'm using GCC), even if I just
  114. > changed a comma.
  115.  
  116. >    Would it be possible to generate several "C" files from one
  117. > grammar, each "C" file matching a user-specified set of rules,
  118. > so that changing a rule will only re-generate the right "C" file ?
  119.  
  120. >   Another question: When will sorcerer next version be released ?
  121.  
  122. > Thanks.
  123.  
  124. >    Manuel ORNATO
  125.  
  126.      Actually, just do as I do and split your grammar file into
  127. several .g's. Have one (the first one in the list to antlr) have the
  128. #header info. Essentially antlr will concatenate them together in
  129. order to produce the scanner and such, but will create a new .c for
  130. every .g. 
  131.  
  132.      This obviously means makefile changes (but not that many.)
  133.  
  134. -- 
  135. 3of5@cube.bit.edu -- 3 of 5 -- Borg Institute of Technology
  136.  
  137. Data (puzzled)     : Aye, sir. Releasing frozen hydrogen-oxygen compound 
  138.                      through ship's environmental systems, Captain.
  139. Picard (shivering) : YOU IDIOT! I SAID "MAKE IT SO"! (stomps to ready room)
  140.  
  141. Manuel,
  142.  
  143. ANTLR allows you to split up the grammar into multiple files, but
  144. will still write each one out to disk.  This is because changing
  145. a rule anywhere may affect every other rule.  Until ANTLR becomes
  146. a LOT smarter, this kind of nice compilation won't happen.
  147.  
  148. A way around this is to have the grammar simply call a bunch of
  149. generic functions like helloJustFoundThisInGrammar(args).  That way
  150. you can change the actions without forcing a recompile.  This makes
  151. the grammar easier to read also.
  152.  
  153. Another sorcerer release (beyond 1.00B13) should be out in a month
  154. or two.
  155.  
  156. Terence
  157.  
  158.    I'm writting to the mailing-list because my
  159. news-server is down, please forgive me.
  160.  
  161.    I've got a grammar file that is becoming rather large, with
  162. a lot of "C" actions. As a result, it takes a lot of time to
  163. compile the antlr-generated "C" file (I'm using GCC), even if I just
  164. changed a comma.
  165.  
  166.    Would it be possible to generate several "C" files from one
  167. grammar, each "C" file matching a user-specified set of rules,
  168. so that changing a rule will only re-generate the right "C" file ?
  169.  
  170.   Another question: When will sorcerer next version be released ?
  171.  
  172.  
  173. Thanks.
  174.  
  175.    Manuel ORNATO
  176.